/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-06-25
 * Time: 20:56
 */
public class test2 {
    public void moveZeroes(int[] nums) {
        int n = nums.length;
        int left = 0;
        for(int i=0;i<n;i++){
            if(nums[i]!=0){
                swap(nums,i,left);
                left++;
            }
        }
    }

    public void swap(int[]nums,int right , int left){
        int tmp = nums[right];
        nums[right] = nums[left];
        nums[left] = tmp;
    }
}
